{% for status_message in status_messages %}
    {{ status_message }}
{% endfor %}

{% if status_messages %}
  {% if any_generator_still_running %}
    <form id="gcb-cancel-visualization-{{ visualization }}"
          action="analytics?action=cancel_visualizations" method="POST">
      <input type="hidden" name="r" value="{{ r }}">
      <input type="hidden" name="xsrf_token" value="{{ xsrf_token_cancel }}">
      <input type="hidden" name="visualization" value="{{ visualization }}">
      <button class="gcb-button" type="submit">
        Cancel Statistic Calculation
      </button>
    </form>
  {% else %}
    <form id="gcb-run-visualization-{{ visualization }}"
          action="analytics?action=run_visualizations" method="POST">
      <input type="hidden" name="r" value="{{ r }}">
      <input type="hidden" name="xsrf_token" value="{{ xsrf_token_run }}">
      <input type="hidden" name="visualization" value="{{ visualization }}">
      <button
         class="gcb-button gcb-pull-right"
         type="submit">
        Update Statistic
      </button>
    </form>
  {% endif %}
{% endif %}
